Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pluggable transfers and multipart transfer implementation #604

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mesemus
Copy link
Contributor

@mesemus mesemus commented Jan 19, 2025

Description

This PR implements RFC 0072—Pluggable Transfer Types for Record Files. It provides transfer classes for all the built-in transfers, a transfer registry, and a transfer-type-aware permission generator.

This PR should be merged together with similar PRs for invenio-rdm-records, invenio-s3, and docs-invenio-rdm.

Checklist

Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:

Frontend

Reminder

By using GitHub, you have already agreed to the GitHub’s Terms of Service including that:

  1. You license your contribution under the same terms as the current repository’s license.
  2. You agree that you have the right to license your contribution under the current repository’s license.

@mesemus mesemus force-pushed the contribution-multipart-transfer branch from a878a3c to 378236c Compare January 19, 2025 18:01
mesemus added a commit to oarepo/invenio-rdm-records that referenced this pull request Jan 19, 2025
* IfFileIsLocal is not used anymore as it was handling just one type of transport

* Switched to IfTransferType permission generators

* Note: needs inveniosoftware/invenio-records-resources#604
@mesemus
Copy link
Contributor Author

mesemus commented Jan 19, 2025

Connected pull requests:

RFC 0072
S3 multipart implementation
invenio-rdm-records - depends on this PR
docs-invenio-rdm

@@ -21,3 +31,7 @@
lambda: current_app.extensions["invenio-records-resources"].notification_registry
)
"""Helper proxy to get the current notifications registry."""

current_transfer_registry: "TransferRegistry" = LocalProxy(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

normally invenio does not add type checks. to be consistent with the rest of invenio i would remove : "TransferRegistry"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and i saw there are a lot of type hints in other files too

mesemus and others added 2 commits January 20, 2025 08:53
* Implementation of RFC 0072 - Pluggable Transfer Types for Record Files

* Pluggable transfer types in invenio_records_resources/services/files/transfers

* Implementation of multipart transfer in the same place

* Permission generator for per-transfer-type permissions

Co-authored-by: Mirek Simek <[email protected]>
@mesemus mesemus force-pushed the contribution-multipart-transfer branch from 378236c to 29f5365 Compare January 20, 2025 12:45
mesemus added a commit to oarepo/invenio-drafts-resources that referenced this pull request Jan 21, 2025
* Implementation of RFC 0072 - Pluggable Transfer Types for Record Files

* Needs inveniosoftware/invenio-records-resources#604
mesemus added a commit to oarepo/invenio-drafts-resources that referenced this pull request Jan 21, 2025
* Implementation of RFC 0072 - Pluggable Transfer Types for Record Files

* Needs inveniosoftware/invenio-records-resources#604
oarepo-bot pushed a commit to oarepo/invenio-drafts-resources that referenced this pull request Jan 22, 2025
* Implementation of RFC 0072 - Pluggable Transfer Types for Record Files

* Needs inveniosoftware/invenio-records-resources#604
mesemus added a commit to oarepo/invenio-rdm-records that referenced this pull request Jan 23, 2025
* IfFileIsLocal is not used anymore as it was handling just one type of transport

* Switched to IfTransferType permission generators

* Note: needs inveniosoftware/invenio-records-resources#604
oarepo-bot pushed a commit to oarepo/invenio-rdm-records that referenced this pull request Jan 23, 2025
* IfFileIsLocal is not used anymore as it was handling just one type of transport

* Switched to IfTransferType permission generators

* Note: needs inveniosoftware/invenio-records-resources#604
oarepo-bot pushed a commit to oarepo/invenio-drafts-resources that referenced this pull request Feb 3, 2025
* Implementation of RFC 0072 - Pluggable Transfer Types for Record Files

* Needs inveniosoftware/invenio-records-resources#604
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants